﻿using DhbInterfaces;
using System.Collections.Generic;

namespace EmbeddedSharp.Scripting.Algebra
{
    public class PointSeries : IPointSeries
    {
        private List<double> xValues = new List<double>();

        private List<double> yValues = new List<double>();

        public void AddPoint(double x, double y)
        {
            xValues.Add(x);
            yValues.Add(y);
        }

        #region IPointSeries Members

        public int Count
        {
            get { return xValues.Count; }
        }

        public double XValueAt(int index)
        {
            return xValues[index];
        }

        public double YValueAt(int index)
        {
            return yValues[index];
        }

        #endregion
    }
}
